<?php
/**
 * A simple helper function to provide global access to the event dispatcher.
 */
function events()
{
    static $eventDispatcher;
    if (!$eventDispatcher) {
        $eventDispatcher = new \dsp\mediator\RealWorld\EventDispatcher();
    }

    return $eventDispatcher;
}